<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>

<script src="http://apps.bdimg.com/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
      $("#ajaxbutton").click(function(){
        var music_url = $("#music_url").val();
 
        $.get("/searchAjax/",{'music_url':music_url}, function(data){
            $('#download_url').text(data)
            $('#download_url').attr("href",data)
        })
      });
    });
</script>

</head>
<body>
    <h1>收费酷狗音乐下载</h1>
    
    <br/> <br/> <br/>

   <form action="/search/" method="get">  
              
        
	   网页酷狗音乐地址:  <input type="text" name="music_url" id="music_url" style="width: 60%">  
	     
	     <input type="button" id="ajaxbutton"  value="ajax查看下载地址">
         <input type="submit"  value="form查看下载地址">
   </form>
   
   
   
   
   
   <br/>

      下载地址:  <a id="download_url" href="{{ download_url }}">{{ download_url }}</a>
   
   
   
</body>
</html>